package com.sv.zgydor.service.impl;

import com.sv.zgydor.dao.TCenunitTreeDAO;
import com.sv.zgydor.pojo.orcl.TCenunitTreeEntity;
import com.sv.zgydor.service.TCenunitTreeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.transaction.Transaction;
import java.util.List;

@Service
public class TCenunitTreeServiceImpl implements TCenunitTreeService {

    @Autowired
    private TCenunitTreeDAO tCenunitTreeDAO;

    @Transactional
    public List<TCenunitTreeEntity> findInitData() {
        return this.tCenunitTreeDAO.findInitData();
    }

    /**
     * 根据指定的parCode查询行政区划列表
     * @param parCode 指定的parCode
     * @return
     */
    @Transactional
    public List<TCenunitTreeEntity> findRegionByParCode(String parCode) {
        return this.tCenunitTreeDAO.findRegionByParCode(parCode);
    }
}
